<?PHP
extract($_POST);

$farr=array();
if (file_exists($path."dump/")) {
   $dir= opendir($path."dump/"); 
   $fl = readdir($dir);
   while ($fl = readdir ($dir)) { 
       if ($fl != "." && $fl != ".." &&  (eregi("\.gz",$fl))){ 
         $farr[]=$fl;
       }
   } 
   closedir($dir); 
}
if (empty($farr)) {
   header("location: error.php?error=4");
}  

  header('Cache-control: private');
  header('Content-Description: File Transfer');
  header('Content-Type: application/force-download');
- header("location: ".$path."dump/".$farr[0]); 
+ header("location: ".dirname($_SERVER['PHP_SELF'])."/dump/".$farr[0]); 

?>         

	
	

